<?php

namespace App\Http\Requests\Common;

use App\Http\Requests\ApiRequest;

/**
 * @property string $device_account_id
 * @property string $product_id
 * @property string $num
 */
class YouzanOrderStoreRequest extends ApiRequest
{
    /**
     * Determine if the user is authorized to make this request.
     *
     * @return bool
     */
    public function authorize()
    {
        return true;
    }

    /**
     * Get the validation rules that apply to the request.
     *
     * @return array
     */
    public function rules()
    {
        return [
            'device_account_id' => 'required|int',
            'product_id'        => 'required|int',
            'num'               => 'required|int|min:1|max:'.self::MAX_INT
        ];
    }
}
